-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat!: set the mode directly in the client #287
Conversation
Signed-off-by: thaisdeboisfosse <thais.de-boisfosse@owkin.com>
Signed-off-by: thaisdeboisfosse <thais.de-boisfosse@owkin.com>
/e2e --refs substrafl=local_mode_client,substra-tests=local_mode_client --mode standalone --tests sdk,substrafl |
The error is
|
/e2e --refs substrafl=local_mode_client,substra-tests=local_mode_client --mode standalone --tests sdk,substrafl |
fixed the substra tests |
/e2e --refs substrafl=local_mode_client,substra-tests=local_mode_client --mode standalone --tests sdk,substrafl |
End to end tests: ✔️ SUCCESS Awesome sauce! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Super small changes, otherwise, LGTM
if debug: | ||
# Hybrid mode: the local backend also connects to | ||
# a remote backend in read-only mode. | ||
if backend_type in [schemas.BackendType.LOCAL_DOCKER, schemas.BackendType.LOCAL_SUBPROCESS]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if backend_type in [schemas.BackendType.LOCAL_DOCKER, schemas.BackendType.LOCAL_SUBPROCESS]: | |
elif backend_type in [schemas.BackendType.LOCAL_DOCKER, schemas.BackendType.LOCAL_SUBPROCESS]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we do not need a elif
since there is a return
statement in the if
above
Companion PRs
#287
Substra/substrafl#19
Substra/substra-tests#210
Substra/substra-documentation#178
Context and user need
In local mode, we can choose between docker model and subprocess mode. This choice is done by the user by specifying an environment variable.
Specifying an environment variable can be difficult and annoying for the user, especially for user without a lof of experience with the terminal.
Functional spec
Specify the local mode with: Client(mode=["REMOTE", "LOCAL_DOCKER", "LOCAL_SUBPROCESS"])
default value: remote
Technical spec:
right now there is a variable env, change how it is passed
use an enum
update the tests:
substra
connectlib
connect-tests
update the examples:
connect-documentation
update the CI
Tests: parametrize the spawner type as a fixture
Update the makefile:
have test fast and slow
keep the same general commands (ie be able to launch the PR tests, the tests on main, and additional commands to keep the dev easy (eg run only fast subprocess test))
Acceptance criteria:
User can specify the local mode to use without having to use environment variables
Notes
Please check if the PR fulfills these requirements